<h1>Order Information</h1>
<{assign var=price value=$orderEntity->getTotalsPrice()}>
<div class="contentContainer">
  <h2>Order #<{$orderEntity->id}> <span class="contentText">(<{$orderEntity->getStatusName()}>)</span></h2>
  <div class="contentText">
    <div>
      <span style="float: right;">Order Total: $<{$price|string_format:"%.2f"}></span>
      Order Date: <{$orderEntity->date_purchased}></div>

    <table border="0" width="100%" cellspacing="1" cellpadding="2">
      <tbody><tr>

        <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tbody><tr>
            <td><strong>Delivery Address</strong></td>
          </tr>
          <tr>
            <td><{$orderEntity->delivery_name}> <br> <{$orderEntity->delivery_street}><br> <{$orderEntity->delivery_city}>, <{$orderEntity->delivery_state}>    <{$orderEntity->delivery_postcode}><br> <{$orderEntity->delivery_country}></td>
          </tr>
          <tr>
            <td><strong>Shipping Method</strong></td>
          </tr>
          <tr>
            <td><{$shippingMethod->name}></td>
          </tr>
        </tbody></table></td>
        <td width="70%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tbody><tr>
            <td colspan="2"><strong>Products</strong></td>
            <td align="right"><strong>Total</strong></td>
          </tr>
           <{assign var=subTotal value=0}>
		<{foreach item=cartItem from=$cartList}>		
		<{assign var=finalPrice value=$cartItem->final_price}>
          <tr>
            <td align="right" valign="top" width="30"><{$cartItem->products_quantity}>&nbsp;x&nbsp;</td>
            <td valign="top"><{$cartItem->products_name}></td>
            <td align="right" valign="top">$<{$cartItem->final_price|string_format:"%.2f"}></td>
          </tr>
		  
		  <{assign var=subTotal value=$subTotal+$finalPrice}>
		  <{/foreach}>
        </tbody></table></td>
      </tr>
    </tbody></table>
  </div>

  <h2>Billing Information</h2>

  <div class="contentText">
    <table border="0" width="100%" cellspacing="1" cellpadding="2">
      <tbody><tr>
        <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tbody><tr>
            <td><strong>Billing Address</strong></td>
          </tr>
          <tr>
            <td><{$orderEntity->billing_name}> <br> <{$orderEntity->billing_street}><br> <{$orderEntity->billing_city}>, <{$orderEntity->billing_state}>    <{$orderEntity->billing_postcode}><br> <{$orderEntity->billing_country}></td>
          </tr>
          <tr>
            <td><strong>Payment Method</strong></td>
          </tr>
          <tr>
            <td><{$orderEntity->payment_method}></td>
          </tr>
        </tbody></table></td>
        <td width="70%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		<{assign var=total value=$subTotal+$shippingMethod->fee}>
          <tbody><tr>
            <td align="right" width="100%">Sub-Total:</td>
            <td align="right">$<{$subTotal|string_format:"%.2f"}></td>
          </tr>
          <tr>
            <td align="right" width="100%"><{$shippingMethod->name}></td>
            <td align="right">$<{$shippingMethod->fee|string_format:"%.2f"}></td>
          </tr>
          <tr>
            <td align="right" width="100%">Total:</td>
            <td align="right"><strong>$<{$total|string_format:"%.2f"}></strong></td>
          </tr>
        </tbody></table></td>
      </tr>
    </tbody></table>
  </div>

  <h2>Order History</h2>

  <div class="contentText">
    <table border="0" width="100%" cellspacing="1" cellpadding="2">
      <tbody><tr>
        <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tbody>
		   <{foreach item=status from=$listStatus}>
		  <tr>
            <td valign="top" width="170"><{$status->date_added}></td>
            <td valign="top" width="70"><{$status->getStatusName()}></td>
            <td valign="top"><{$status->comments}></td>
          </tr>
		  <{/foreach}>
        </tbody></table></td>
      </tr>
    </tbody></table>
  </div>

<{if $isWebsiteOwner == false}>
  <div class="buttonSet">
    <span class=""><a id="tdb5" href="<{$APPLICATION_URL}>/<{$ownerName}>MyAccount/orderHistory" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-w"></span>Back</a></span><script type="text/javascript">$("#tdb5").button({icons:{primary:"ui-icon-triangle-1-w"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>  </div>
	
	<{/if}>
</div>